package com.designpattern.creating.factory;

import com.designpattern.creating.abstractfactory.FactoryInterFace;
import lombok.extern.slf4j.Slf4j;

/**
 * @author chengze
 * @date 2022/11/22
 * @desc 产线1
 */
@Slf4j
public class Factory implements FactoryInterFace {

    public BizInterFace getBizService(int bizType){
        switch (bizType){
           case  1 : {
               return new BizService1();
           }
           case  2: {
               return new BizService2();
           }
            default:
                log.info("没有匹配的业务类型！");
                return null;
        }
    }
}
